<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="templateGeneral.xhtml">
        <ui:define name="title">Promena lozinke</ui:define>
        <ui:define name="center">
            <h:form>
                <p:growl id="message" sticky="false"/>
                <h:panelGrid columns="2" cellpadding="10" style="margin-left: 300px;margin-top: 200px">
                    <h:outputText value="Stara lozinka"/>
                    <p:password value="#{userBean.oldPassword}"/>
                    <h:outputText value="Nova lozinka"/>
                    <p:password id="pass1" label="Lozinka" value="#{userBean.newPassword}" match="pass2" required="true" requiredMessage="Morate uneti lozinku"/>
                    <h:outputText value="Ponovi novu lozinku"/>
                    <p:password id="pass2" label="Ponovi lozinka" value="#{userBean.reEnteredNewPassword}" required="true" requiredMessage="Morate uneti lozinku"/>
                    <p:commandButton value="Snimi" actionListener="#{userBean.changePassword()}" />
                </h:panelGrid>
            </h:form>
        </ui:define>
    </ui:composition>
</html>

